1. Field of the Invention
The present invention relates to a computer system including a graphical users interface (GUI). More specifically, the present invention relates to an apparatus and method for caching character strings to improve the performance of the GUI during the display of text strings.
2. Description of the Related Art
Computer systems generally include a graphical users interface (GUI) for displaying information on a display screen. The GUI supplies the drawing functions for lines and shapes, color management and font handling. One task of a GUI is the display of textual material on the screen. A glyph generation, the rendering and display of text characters on a display, is a time-intensive operation that often sets the pace of operation of many GUI operations. (A glyph is defined as an image, usually of a character, in a font, or a graphic symbol having an appearance that conveys information.) A rendering, as defined in the field of computer graphics, refers to the creation of an image on a display screen from data that describes the screen. Examples of rendering operations include the creation of a three-dimensional image that incorporates the simulation of lighting effects such as shadowing and reflections and in multimedia videotaping, the creation of a realistic image from objects and light data in a scene. Rendering of text includes the operations of forming text characters according to a specific defined font, coloration of the text character and background, positioning of the character on a display screen, and similar operations defining a character display.
Multimedia computer systems often include hardware accelerators to improve performance of media displays and other output devices. One common hardware accelerator is a graphics accelerator. A graphics accelerator is a hardware device dedicated to increasing the speed and performance of graphics. Graphics accelerators implement I/O-bound or computation-intensive tasks such as blits, polygons and text rasterization, freeing a central processing unit in a multimedia computer system for other operations Graphics accelerators are used to improve the performance of text displays by rapidly displaying text bitmaps on a monitor.
One technique which has been employed to improve the performance of text display in a GUI is the usage of a font cache. A font cache is a cache memory for storing individual characters in a defined font size and style. The rendering of a character is stored in the font cache as needed. When a character is requested for display, a hashing operation is performed on the character font to generate an index for accessing the character for display. A string of characters is displayed by individually dereferencing the input characters in the defined font and building a string display from pieces of the characters. A string is defined as a connected sequence of characters or bits treated as a single data item.
Usage of a font cache improves the performance of text displays and efficiently uses the cache memory. However, the display software includes an operating loop for individually displaying each character in the string in a pipeline manner. The individual display of each character hinders the performance of a text display. In GUI system using a graphics accelerator, a request to display each character is transferred to the graphics accelerator, generally via the system bus, and the font cache is accessed for each transferred character. Furthermore, spacing and orientation are calculated on a per-character basis. For each access of the font cache, an individual character bitmap is generated for display. The transfer of a request to display a character over the system bus is typically the operation which limits the performance of a computer system using a graphics accelerator. Text is generally displayed as a character string so that data is transferred over the system bus to the font cache in the graphics accelerator for each character of the character string.
Font caching typically includes the steps of finding a font corresponding to a requested display character and determining whether the character font is stored in the font cache. If the font character is not available in the font cache, the font character is placed in the font cache. Then, on a character-by-character basis, the font cache technique involves ascertaining whether the character is contained in the font cache. If the character is not cached, a bitmap character corresponding to the character and selected font is stored in the font cache. The position of the character in the font cache is determined and sent to the accelerator via the system bus. The accelerator receives the position of the character from the system bus, accesses the font cache using the received position of the character and displays the individual character using the accessed data from the font cache. The process is repeated for each character.
The font caching technique improves the performance of a computer system during display of characters because rendering of the individual characters is avoided after the cache is initialized. When a font modification is made the cache generally is reinitialized, thereby ensuring stability. Furthermore, many calculations are necessary to form a sequence of characters in a string. The position of each displayed character is calculated on a character-by-character basis. A sequence of characters is typically displayed by scanning from left-to-right across a line and, at the end of a line, down to a next line. Accordingly, no a priori information is known regarding the position of a character with respect to a previous character in a sequence. RAM is generally optimized for sequential transfer rather than an indeterminate "zig-zag" access that tends to result from operation using the font caching technique.
What is needed is a computer system and operating method for improving the performance of a graphical users interface (GUI) with respect to the display of textual characters.